package com.dynamic.mybatis.bootstrap.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 数据库配置
 * </p>
 *
 * @author xs
 * @since 2023-09-16
 */
@TableName("data_source")
public class DataSourceEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 命名空间
     */
    private String namespace;

    /**
     * 编号
     */
    private String code;

    /**
     * 唯一编码
     */
    private String uniqueCode;

    /**
     * 名字
     */
    private String name;

    /**
     * 数据库类
     */
    private String type;

    /**
     * url
     */
    private String url;

    /**
     * 环境
     */
    private String env;

    /**
     * 驱动类
     */
    private String driverClass;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 状态0=禁用；1=启用
     */
    private Byte status;

    /**
     * 属性
     */
    private String attributes;

    private Byte isDeleted;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 创建人账号
     */
    private String createBy;

    /**
     * 修改时间
     */
    private LocalDateTime updateTime;

    /**
     * 修改人账号
     */
    private String updateBy;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNamespace() {
        return namespace;
    }

    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getUniqueCode() {
        return uniqueCode;
    }

    public void setUniqueCode(String uniqueCode) {
        this.uniqueCode = uniqueCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getEnv() {
        return env;
    }

    public void setEnv(String env) {
        this.env = env;
    }

    public String getDriverClass() {
        return driverClass;
    }

    public void setDriverClass(String driverClass) {
        this.driverClass = driverClass;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public String getAttributes() {
        return attributes;
    }

    public void setAttributes(String attributes) {
        this.attributes = attributes;
    }

    public Byte getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Byte isDeleted) {
        this.isDeleted = isDeleted;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }


    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }



    @Override
    public String toString() {
        return "DataSourceEntity{" +
                "id = " + id +
                ", namespace = " + namespace +
                ", code = " + code +
                ", uniqueCode = " + uniqueCode +
                ", name = " + name +
                ", type = " + type +
                ", url = " + url +
                ", env = " + env +
                ", driverClass = " + driverClass +
                ", username = " + username +
                ", password = " + password +
                ", status = " + status +
                ", attributes = " + attributes +
                ", isDeleted = " + isDeleted +
                ", createTime = " + createTime +
                ", createBy = " + createBy +
                ", updateTime = " + updateTime +
                ", updateBy = " + updateBy +
                "}";
    }
}
